home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000243_news@columbia.edu _Thu Oct 28 10:28:19 1999.msg < prev    next >
Internet Message Format  |  2020-01-01  |  6KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA29901
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 28 Oct 1999 10:28:18 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id KAA09467
  7.     for kermit.misc@watsun.cc.columbia.edu; Thu, 28 Oct 1999 10:19:45 -0400 (EDT)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: Input timings
  11. Date: 28 Oct 1999 14:19:44 GMT
  12. Organization: Columbia University
  13. Message-ID: <7v9m20$97o$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <7v837l$5vv$1@samba.rahul.net>,
  17. Clarence Dold  <dold@network.rahul.net> wrote:
  18. : Michael Hamelin <hamelin@ici.net> wrote:
  19. : : In my case, we are using a VMS AXP running ckermit7.0 beta 10
  20. : : connecting to another VMS machine. We log in, and then send DCL
  21. : : commands. One of the DCL commands is to have the VAX decompress
  22. : : (UNZIP) a file. If you do this on the machine manually..it runs
  23. : : for 2-4 minutes and then gives you back a prompt.  It does send a
  24. : : few lines of output back to the screen, but no $ that i know of or
  25. : Hey!
  26. : Do you have 
  27. :     input 600 $
  28. : in your script?
  29. : You can't do that ;-)
  30. : You need to look for another character for the input character.
  31. : This "input" is responding to the first character that comes in.
  32. "input 600 $" is correct -- dollar-sign is a normal character to
  33. Kermit.  The form of the INPUT command that waits for ANY character
  34. is "input 600" (no character or string specified).  However, since
  35. the "$" is so prevalent in VMS messages, perhaps (as suggested in the
  36. manual) a better way to wait for the prompt would be:
  37.  
  38.   input 600 {13\10\$ }
  39.  
  40. "input 600 $" will, of course, succeed as soon as a dollar-sign comes
  41. in, which could happen if there were any VMS prompts that hadn't
  42. been read yet, or any of the messages from UNZIP contained dollar signs,
  43. which we tend to find in VMS filespecs.
  44.  
  45. This thread has several independent lives; one here, others in direct
  46. email, so nobody gets to see it all.  (So please when starting one of
  47. these threads, post to the newsgroup or send email to the
  48. kermit-support address, but not both, thanks.)
  49.  
  50. Anyway, this is a classic example of asking the wrong question.  The
  51. real question is: "How do I use Kermit to send a file from A to B,
  52. unzip it on B (which could take any amount of time at all), and then
  53. go on to the next item in the list as soon as unzipping is finished?"
  54. The answer would have been more like this:
  55.  
  56.  1. Make the connection from A to B (in this case both of them are
  57.     VMS systems).
  58.  
  59.  2. Start Kermit on B and put it in server mode.
  60.  
  61.  3. Send it the ZIP file (Note: since both systems are VMS, so the two
  62.     Kermits will go into "labeled" transfer mode automatically, thus
  63.     making an image copy of the file with all RMS attributes preserved).
  64.  
  65. (Note: I am assuming that the file needed to be sent from A to B, and was
  66. not on B already; this was unclear from the postings.  If this was not the
  67. case then just skip step 3.)
  68.  
  69.  4. Give the command "remote host unzip <name-of-zip-file>".  Now here we
  70.     have an innovation in C-Kermit 7.0 that you probably won't even notice
  71.     unless you tried this in earlier versions.  The Unzip process takes a
  72.     long time (you don't have to know how long, as you do with the INPUT
  73.     method).  In previous versions, the Kermit client would time out when
  74.     no response came from the server within a few seconds, and eventually
  75.     would give up after too many timeouts.  The new version, however,
  76.     sends "keepalives" while a REMOTE HOST command is executing to ensure
  77.     the client doesn't lose patience, no matter how long the host command
  78.     takes.
  79.  
  80.  5. Go on to the next item.  I believe you wanted to rename the original
  81.     ZIP file?  So "remote rename <name-of-zip-file> <new-name>".
  82.  
  83. In other words, do the whole job in client/server mode.  As you can see,
  84. there are advantages to doing it this way:
  85.  
  86.  1. No more synchronization problems.
  87.  
  88.  2. You can check each operation for success and failure in a 
  89.     straightforward manner.
  90.  
  91. The script (after logging in) would look something like this:
  92.  
  93.   output kermit -x\13        ; (or "lineout kermit -x" in 7.0)
  94.   input 20 READY TO SERVE... ; wait for confirmation
  95.   if fail <do-something-appropriate>
  96.   send somefile.zip
  97.   if fail <do-something-appropriate>
  98.   remote host unzip somefile.zip
  99.   if fail <do-something-appropriate>
  100.   remote rename somefile.zip something_else.zip
  101.   if fail <do-something-appropriate>
  102.   etc etc
  103.  
  104. As to why "input 600 $" appears to terminate early, we still don't know,
  105. but we can't reproduce it either -- it works fine on our local VMS system.
  106.  
  107. "input 600 $" should not terminate early (and does not, in our experience)
  108. unless (a) it gets a dollar-sign, or (b) the connection is lost.  This was
  109. checked on a VMS-to-VMS connection with C-Kermit 7.0 Beta.10, same as you
  110. have:
  111.  
  112.   DKA0:[FDC] C-Kermit>def xx echo, echo \v(time), input 600 $, status, -
  113.    echo \v(time), show var in
  114.   DKA0:[FDC] C-Kermit>xx
  115.    0:36:57
  116.     FAILURE
  117.    \v(inchar) =
  118.    \v(incount) = 1
  119.    \v(inmatch) =
  120.    \v(instatus) = 1
  121.    \v(intime) = 600778
  122.    \v(inwait) = 600
  123.   DKA0:[FDC] C-Kermit>
  124.  
  125. - Frank